%------------------------------------------------------------------------------
%----Include simple maths definitions and axioms
include('Axioms/LCL008^0.ax').
%------------------------------------------------------------------------------
%----$tType
thf(a,type,
a: $tType )).
%----The type role and global typing of constants
thf(p,type,(
p: ( a > $i > $o ) > $i > $o )).
thf(g,type,(
g: a > $i > $o )).
thf(e,type,(
e: ( a > $i > $o ) > a > $i > $o )).
%----$i and $o
thf(r,type,(
r: $i > $i > $o )).
%----> for function types
thf(mall_aio,type,(
mall_aio: ( ( a > $i > $o ) > $i > $o ) > $i > $o )).
thf(mall_a,type,(
mall_a: ( a > $i > $o ) > $i > $o )).
%----Local typing of variables and ^ as the lambda binder
thf(mall_aio,definition,
( mall_aio
= ( ^ [P: ( a > $i > $o ) > $i > $o,W: $i] :
! [X: a > $i > $o] :
( P @ X @ W ) ) )).
thf(mall_a,definition,
( mall_a
= ( ^ [P: a > $i > $o,W: $i] :
! [X: a] :
( P @ X @ W ) ) )).
%----@ for application
thf(positiveness,axiom,
( mvalid
@ ( mall_aio
@ ^ [X: a > $i > $o] :
( mimpl @ ( mnot @ ( p @ X ) )
@ ( p
@ ^ [Z: a] :
( mnot @ ( X @ Z ) ) ) ) ) )).
thf(g,definition,
( g
= ( ^ [Z: a] :
( mall_aio
@ ^ [X: a > $i > $o] :
( mimpl @ ( p @ X ) @ ( X @ Z ) ) ) ) )).
thf(e,definition,
( e
= ( ^ [X: a > $i > $o,Z: a] :
( mall_aio
@ ^ [Y: a > $i > $o] :
( mimpl @ ( Y @ Z )
@ ( mbox @ r
@ ( mall_a
@ ^ [W: a] :
( mimpl @ ( X @ W ) @ ( Y @ W ) ) ) ) ) ) ) )).
thf(thm,conjecture,
( mvalid
@ ( mall_a
@ ^ [Z: a] :
( mimpl @ ( g @ Z ) @ ( e @ g @ Z ) ) ) )).
%------------------------------------------------------------------------------